package com.zong.consumer;

import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.zong.api.UserService;

/**
 * Hello world!
 *
 */
public class App {
	public static void main(String[] args) throws Exception {
		// 测试常规服务
		ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("consumer.xml");
		context.start();
		System.out.println("consumer start");
		UserService userService = context.getBean(UserService.class);
		while(true){
			System.out.println(userService.say("尼玛"));
			Thread.sleep(1000);
		}
	}
}
